

public class Speise extends Lebensmittel {

	public Speise(String name, int menge) {
		super(name, menge);
	}

	@Override
	public boolean essen() {
		return true;
	}

	public boolean essen(int menge) {
		if (this.menge == 0) {
			return false; // EINKAUFEN!
		}
		if (this.menge > menge) {
			this.menge = this.menge - menge; // GUTEN APPETIT
		} else {
			this.menge = 0; // RESTEVERTILGEN
		}
		return true;
	}

	@Override
	public boolean trinken() {
		return false;
	}

	@Override
	public String status() {
		return this.status("");
	}

	public String status(String text) {
		String result = "";
		result = "Speise: " + this.getClass().getName() + " " + text + this.name + " (" + this.menge + " g)";
		return result;
	}

}
